<extend name="Layout:list" />
<block name="title"><title>分类管理</title></block>
<block name='subnav'>
    <a class="btn red" href="__CONTROLLER__/register">添加分类</a>　<a class="btn red-stripe" href="javascript:void(0);">分类管理</a>
</block>
<block name="main">
    <div class="table-list">
        <table width="100%" cellspacing="0">
            <thead>
                <tr>
                    <th align="left">name</th>
                    <th align="left">label</th>
                    <th align="left">模型</th>
                    <th class="text-c">操作</th>
                </tr>
            </thead>
            <tbody>
                <?php foreach ($taxonomy_group as $post_type => $taxonomies) { ?>
                    <?php foreach ($taxonomies as $taxonomy_name => $taxonomy) { ?>
                    <tr>
                        <td><?php echo $taxonomy['name']; ?></td>
                        <td><?php echo $taxonomy['label']; ?></td>
                        <td><?php echo $post_type; ?></td>
                        <td class="text-c">
                            <a href="__MODULE__/Category/index?<?php echo http_build_query(array('post_type' => $post_type, 'taxonomy_name' => $taxonomy_name)); ?>">类目管理</a> | <a onclick="return ConfirmDel();" href="__CONTROLLER__/delete?<?php echo http_build_query(array('post_type' => $post_type, 'taxonomy_name' => $taxonomy_name)); ?>">删除</a>
                        </td>
                    </tr>
                    <?php } ?>
                <?php } ?>
            </tbody>
        </table>
    </div>
</block>